home *** CD-ROM | disk | FTP | other *** search
/ Gamers Delight 2 / Gamers Delight 2.iso / Aminet / game / role / DebugTool_111.lha / srcrecog.c < prev    next >
C/C++ Source or Header  |  1993-05-06  |  5KB  |  219 lines

  1. #include "frobnitz.h"
  2.  
  3. /*******************************************************************/
  4. /*  Funktion: WhichGame                                            */
  5. /*******************************************************************/
  6.  
  7. /*  corresponds to Infocom Fact Sheet 4.3 of April 19, 1993        */
  8. /*  (only the versions I own)                                      */
  9.  
  10. int
  11. WhichGame (void)
  12. {
  13.   static long version_table[] =
  14.   {
  15.     1, 23, 820428,
  16.     1, 25, 820515,
  17.     1, 28, 821013,
  18.     1, 30, 830330,
  19.     1, 75, 830929,
  20.     1, 76, 840509,
  21.     1, 88, 840726,
  22.     1, 52, 871125,        /* Zork I */
  23.  
  24.     2, 17, 820427,
  25.     2, 18, 820517,
  26.     2, 22, 830331,
  27.     2, 48, 840904,        /* Zork II */
  28.  
  29.     3, 10, 820818,
  30.     3, 15, 830331,
  31.     3, 15, 840518,
  32.     3, 17, 840727,        /* Zork III */
  33.  
  34.     4, 15, 820901,
  35.     4, 17, 821021,        /* Starcross */
  36.  
  37.     5, 26, 821108,
  38.     5, 27, 831005,        /* Deadline */
  39.  
  40.     6, 7, 830419,
  41.     6, 8, 830521,
  42.     6, 8, 840521,        /* Suspended */
  43.  
  44.     7, 13, 830524,
  45.     7, 20, 831119,
  46.     7, 21, 831208,
  47.     7, 22, 840924,        /* Witness */
  48.  
  49.     8, 20, 830708,
  50.     8, 29, 840118,
  51.     8, 37, 851003,
  52.     8, 10, 880531,        /* Planetfall */
  53.  
  54.     9, 10, 830810,
  55.     9, 16, 831118,
  56.     9, 24, 851118,
  57.     9, 29, 860820,        /* Enchanter */
  58.  
  59.     10, 22, 830916,        /* Infidel */
  60.  
  61.     11, 15, 840501,
  62.     11, 15, 840522,
  63.     11, 16, 850515,
  64.     11, 16, 850603,        /* Seastalker */
  65.  
  66.     12, 4, 840131,
  67.     12, 6, 840508,
  68.     12, 13, 851021,
  69.     12, 15, 851108,
  70.     12, 18, 860904,        /* Sorcerer */
  71.  
  72.     13, 23, 840809,        /* Cutthroats */
  73.  
  74.     14, 47, 840914,
  75.     14, 56, 841221,
  76.     14, 58, 851002,
  77.     14, 59, 851108,
  78.     14, 31, 871119,        /* Hitchhiker */
  79.  
  80.     15, 14, 841005,        /* Suspect */
  81.  
  82.     16, 68, 850501,
  83.     16, 69, 850920,
  84.     16, 23, 880706,        /* Wishbringer */
  85.  
  86.     17, 77, 850814,
  87.     17, 79, 851122,        /* AMFV */
  88.  
  89.     18, 63, 850916,
  90.     18, 87, 860904,        /* Spellbreaker */
  91.  
  92.     19, 97, 851218,        /* Ballyhoo */
  93.  
  94.     20, 11, 860509,
  95.     20, 12, 860926,        /* Trinity */
  96.  
  97.     21, 59, 860730,
  98.     21, 4, 880405,        /* LGOP */
  99.  
  100.     22, 4, 860918,
  101.     22, 9, 861022,        /* Moonmist */
  102.  
  103.     23, 37, 861215,        /* Hollywood Hijinx */
  104.  
  105.     24, 86, 870212,
  106.     24, 116, 870602,        /* Bureaucracy */
  107.  
  108.     25, 107, 870430,        /* Stationfall */
  109.  
  110.     26, 203, 870506,
  111.     29, 219, 870912,
  112.     26, 221, 870918,        /* Lurking Horror */
  113.  
  114.     27, 26, 870730,        /* Plundered Hearts */
  115.  
  116.     28, 19, 870722,        /* Nord And Bert */
  117.  
  118.     29, 47, 870915,
  119.     29, 49, 870917,
  120.     29, 51, 870923,
  121.     29, 57, 871221,        /* Beyond Zork */
  122.  
  123.     30, 9, 871008,        /* Border Zone */
  124.  
  125.     31, 21, 871214,
  126.     31, 26, 880127,        /* Sherlock */
  127.  
  128.     32, 296, 881019,
  129.     32, 366, 890323,
  130.     32, 393, 890714,        /* Zork Zero */
  131.  
  132.     33, 295, 890321,
  133.     33, 322, 890706,        /* Shogun */
  134.  
  135.     34, 30, 890322,
  136.     34, 83, 890706,        /* Journey */
  137.  
  138.     35, 54, 890606,
  139.     35, 74, 890714,        /* Arthur */
  140.  
  141.     0, 0, 0            /* UNKNOWN */
  142.   };
  143.  
  144.   long release, revision;
  145.   long t_game, t_release, t_revision;
  146.   int count = 0;
  147.  
  148.   release = header.release;
  149.   revision = atol (header.rev_date);
  150.  
  151.   while (t_game != 0)
  152.     {
  153.       t_game = version_table[count++];
  154.       t_release = version_table[count++];
  155.       t_revision = version_table[count++];
  156.  
  157.       if ((release == t_release) && (revision == t_revision))
  158.     break;
  159.     }
  160.  
  161.   return (t_game);
  162. }
  163.  
  164. /*******************************************************************/
  165. /*  Funktion: PrintGame                                            */
  166. /*******************************************************************/
  167.  
  168. void
  169. PrintGame (int number)
  170. {
  171.   static char *game_name[] =
  172.   {
  173.     "Unknown (...please contact me!)",
  174.     "Zork I - The Great Underground Empire",
  175.     "Zork II - The Wizard Of Frobozz",
  176.     "Zork III - The Dungeon Master",
  177.     "Starcross",
  178.     "Deadline",
  179.     "Suspended",
  180.     "The Witness",
  181.     "Planetfall",
  182.     "Enchanter",
  183.     "Infidel",
  184.     "Seastalker",
  185.     "Sorcerer",
  186.     "Cutthroats",
  187.     "The Hitchhiker's Guide To The Galaxy",
  188.     "Suspect",
  189.     "Wishbringer - The Magick Stone Of Dreams",
  190.     "A Mind Forever Voyaging",
  191.     "Spellbreaker",
  192.     "Ballyhoo",
  193.     "Trinity",
  194.     "Leather Goddesses Of Phobos",
  195.     "Moonmist",
  196.     "Hollywood Hijinx",
  197.     "Bureaucracy",
  198.     "Stationfall",
  199.     "The Lurking Horror",
  200.     "Plundered Hearts",
  201.     "Nord And Bert Couldn't Make Head Or Tail Of It",
  202.     "Beyond Zork",
  203.     "Border Zone",
  204.     "Sherlock - The Riddle Of The Crown Jewels",
  205.     "Zork Zero - The Revenge Of Megaboz",
  206.     "James Clavell's Shogun",
  207.     "Journey",
  208.     "Arthur - The Quest For Excalibur"
  209.   };
  210.  
  211.   printf ("GAME:\n\n");
  212.   if (is_savefile)
  213.     printf ("Savefile of \"");
  214.   printf ("%s", game_name[number]);
  215.   if (is_savefile)
  216.     printf ("\" (level %d)", header_level);
  217.   newline ();
  218. }
  219.